package cn.edu.xmist.builder;

public class BuilderTest {
    public static void main(String[] args) {

        /**
         * 无导演类，获取产品过程复杂不可控
         */
        ConcreteBuilder concreteBuilder = new ConcreteBuilder();
        concreteBuilder.setPart();
        concreteBuilder.testSafe();
        Product product = concreteBuilder.buildProduct();
        System.out.println(product.getName());

        /**
         * 有导演类
         */
        Director director = new Director();
        Product product1 = director.getProduct();
        System.out.println(product1.getName());
    }
}
